﻿using System;
using System.Collections.Generic;
using System.Reflection;
using System.Text;

namespace AttributeDemo.CustomAttribute
{
    [AttributeUsage(AttributeTargets.Property,AllowMultiple =true)]
    public class IdCardAttribute: AbstratValidateAttribute
    {
        public  override bool Validate(object idcard)
        {
            return idcard != null && idcard.ToString().Length == 18;
        }
    }
}
